﻿using System.Net;
using Spider.Dygod;

namespace Spider
{
    /// <summary>
    /// 爬虫处理服务
    /// </summary>
    internal class HandleService
    {
        /// <summary>
        /// 电影天堂爬虫Handle
        /// </summary>
        private readonly Handle Handle = new Handle();

        /// <summary>
        /// 构造函数
        /// </summary>
        public HandleService()
        {
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
        }

        /// <summary>
        /// 开始服务
        /// </summary>
        public void Start()
        {
            Handle.Start();
        }

        /// <summary>
        /// 停止服务
        /// </summary>
        public void Stop()
        {
            Handle.Stop();
        }
    }
}
